from aip import AipFace
from config import *
from baidu_aip_utils import *


# 百度AIP接口
client = AipFace(BAIDU_AIP_APP_ID, BAIDU_AIP_API_KEY, BAIDU_AIP_SECRET_KEY)

""" 调用人脸比对 """
if __name__ == '__main__':
    for meizi in ("xiaoq", "tiantian", "shiyou"):
        meizi_photo = "data/%s.jpg"%meizi

        images = [
            image_file_format('data/ashuang.jpg'),
            image_file_format(meizi_photo)
        ]
        result_json = client.match(images)
        print(result_json)
